Skip to content

feat(desktop): first-run inference-source onboarding#550

Open
LuigiElleBalotta wants to merge 23 commits into
open-jarvis:mainfrom
LuigiElleBalotta:feature/lm-studio
Open

feat(desktop): first-run inference-source onboarding#550
LuigiElleBalotta wants to merge 23 commits into
open-jarvis:mainfrom
LuigiElleBalotta:feature/lm-studio

Conversation

@LuigiElleBalotta

@LuigiElleBalotta LuigiElleBalotta commented Jun 15, 2026

Copy link
Copy Markdown

Summary

  • Adds a first-run onboarding flow for the desktop app: when ~/.openjarvis/inference.json is missing, the app probes for a running Ollama/LM Studio instance, lets the user confirm or pick a custom OpenAI-compatible server, then boots the backend.
  • Extracts a shared InferenceSourceForm component (used by Settings, Onboarding, and a new "Reconfigure" error-recovery flow on SetupScreen).
  • Adds a "Reconfigure" action to SetupScreen's error state so a bad/unreachable inference source can be fixed without manually editing inference.json.
  • New Rust: config_missing, probe_local_engines (Ollama/LM Studio probes), start_backend status reset for clean retries.
  • Also includes earlier commits on this branch defaulting engine hosts to 127.0.0.1 (Windows localhost/IPv6 fix).

Design doc: docs/superpowers/specs/2026-06-12-inference-onboarding-design.md
Implementation plan: docs/superpowers/plans/2026-06-12-inference-onboarding.md

Test plan

  • cargo test — 26/26 pass
  • cargo check — clean, no warnings
  • npx tsc -b --noEmit — no errors
  • npm test — 6/6 pass
  • Manual: npm run tauri dev with no inference.json — app builds and launches onboarding successfully
  • Full manual matrix (Ollama-only / LM Studio-only / both / neither / broken-config Reconfigure) — see plan Task 9 step 4

This PR references #517 and it's made by Claude Code

On Windows, http://localhost connects via IPv6 first, finds nothing
listening, and falls back to IPv4 after ~2s - racing health()'s 2.0s
timeout and causing flaky 'unreachable' results for healthy local
engines (LM Studio, vLLM, etc.). 127.0.0.1 connects directly.
OllamaEngine._DEFAULT_HOST changed to 127.0.0.1 in a prior commit;
these respx mocks still targeted localhost, breaking 5 tests.
…h to 127.0.0.1

Final review for the localhost->127.0.0.1 fix found two leftover
localhost defaults missed by the per-engine sweep: the abstract
_OpenAICompatibleEngine._default_host (dead in practice since every
concrete engine overrides it, but contradicted the updated docs) and
the OllamaModelList fetch in SettingsPage.tsx, which hits the same
Windows localhost/IPv6 DNS delay this whole change exists to avoid.
Prevents double setInferenceSource/startBackend calls via the
onboarding form path while a submission is in flight.
Avoids a transient reappearance of the stale error banner between
start_backend's server-side status reset and the next 800ms poll tick.
try_lock() on a freshly-constructed Mutex always succeeds today, but
silently stranding status at phase: "starting" forever if it ever
didn't would recreate the first-run dead end this feature fixes.
Spawn an async task with .lock().await instead.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants